public class demo007 {
    public static void main(String[] args){
        double a=1000;
        double sum=0;
        int i=1;
        while (i<=5){
            sum=sum+a+a/2;
            a=a/2;
            i++;
        }

        System.out.println(sum);
    }
}
